"use strict";
import * as React from 'react';
const { View, ScrollView } = require('react-native');
const { connect } = require('react-redux');
import { commonProps, commonStyles } from "../../assets/styles/common";
import NavBackButton from "../../component/BackButton";
import Colors from "../../assets/styles/Colors";
const NavigationBar = require('react-native-navbar').default;
const { Actions } = require("react-native-router-flux");
const { List, Switch } = require('antd-mobile');
class ConfigNoticePage extends React.Component {
    constructor(props, context) {
        super(props, context);
        this.onChange = (f, v) => {
            let obj = {};
            obj[f] = v;
            this.setState(Object.assign({}, obj));
        };
        this.state = {
            notice: false,
            mail: false,
        };
    }
    render() {
        return (<View style={[commonStyles.container]}>
                <NavigationBar {...commonProps.navBar} leftButton={<NavBackButton />} title={{ title: '配置通知', tintColor: Colors.White }}/>
                <ScrollView>
                    <List>
                        <List.Item extra={<Switch checked={this.state.notice} onChange={this.onChange.bind(this, 'notice')}/>}>信息</List.Item>
                        <List.Item extra={<Switch checked={this.state.mail} onChange={this.onChange.bind(this, 'mail')}/>}>邮件</List.Item>
                    </List>
                </ScrollView>
            </View>);
    }
}
export default ConfigNoticePage;
